import 'package:flutter/material.dart';

// 盒容器灰色下划线
final bottomLineBoxDecoration = BoxDecoration(
    color: Colors.grey[100],
    border: Border(bottom: BorderSide(color: Colors.grey[300])));

// 盒容器单下划线
final bottomLineOnlyDecoration = BoxDecoration(
  border: Border(bottom: BorderSide(color: Colors.grey[100], width: 0.5)));

// 输入表单域样式
final inputDecoration = (String hint) => InputDecoration(
      contentPadding: EdgeInsets.only(left: 20, right: 20),
      border: InputBorder.none,
      hintText: hint ?? '',
      hintStyle: TextStyle(fontSize: 15, color: Colors.grey),
    );

// 线性垂直灰色渐变
final verticalGrayGradient = BoxDecoration(
    gradient: LinearGradient(
        begin: Alignment.bottomCenter,
        end: Alignment.topCenter,
        colors: [Colors.black54, Colors.transparent]));

///黑色线性渐变
Gradient blackLinearGradient({bool fromTop = false}) {
  return LinearGradient(
      begin: fromTop ? Alignment.topCenter : Alignment.bottomCenter,
      end: fromTop ? Alignment.bottomCenter : Alignment.topCenter,
      colors: [
        Colors.black54,
        Colors.black45,
        Colors.black38,
        Colors.black26,
        Colors.black12,
        Colors.transparent
      ]);
}

// 黑色小气泡盒子背景
final blackBubbleBackground = BoxDecoration(
    color: Colors.black38, borderRadius: BorderRadius.circular(3));
